//
//  GWStatuseDetailView.m
//  新浪微博
//
//  Created by qianfeng on 16/2/18.
//  Copyright (c) 2016年 高炜. All rights reserved.
//

#import "GWStatuseDetailView.h"
#import "GWStatuseOriginalView.h"
#import "GWStatuseReportView.h"
#import "GWDetailStatuseFrame.h"

@interface GWStatuseDetailView()
@property (nonatomic,weak)GWStatuseOriginalView *originalView;
@property (nonatomic,weak)GWStatuseReportView *reportView;

@end

@implementation GWStatuseDetailView
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self =[super initWithFrame:frame]) {
        self.userInteractionEnabled =YES;
        [self setupOriginalView];
        
        [self setupReportView];
        self.image =[UIImage reSizeWithName:@"timeline_card_top_background"];
    }
    return self;
}

-(void)setupOriginalView
{
    GWStatuseOriginalView *originalView =[[GWStatuseOriginalView alloc]init];
    [self addSubview:originalView];
    self.originalView =originalView;
}

-(void)setupReportView
{
    GWStatuseReportView *reportView =[[GWStatuseReportView alloc]init];
    [self addSubview:reportView];
    self.reportView =reportView;
}

-(void)setDetailStatuseFrame:(GWDetailStatuseFrame *)detailStatuseFrame
{
    _detailStatuseFrame =detailStatuseFrame;
    self.frame =detailStatuseFrame.frame;
    
    self.originalView.originalStatuseFrame =detailStatuseFrame.originalStatuseFrame;
    
    self.reportView.reportStatuseFrame =detailStatuseFrame.reportStatuseFrame;
}
@end
